import request from '@/utils/request'
import { he } from 'element-plus/es/locales.mjs'

// 新增取数申请
export function apply(data) {
  return request({
    headers: { 'Content-Type': 'multipart/form-data' },
    url: '/data/apply/add',
    method: 'post',
    data: data
  })
}

// 查询取数模板列表
export function list(query) {
  return request({
    url: '/data/apply/list',
    method: 'get',
    params: query
  })
}

// 审批
export function approve(data) {
  return request({
    url: '/data/apply/approve',
    method: 'post',
    data: data
  })
}


// 查询取数模板列表
export function detail(id) {
  return request({
    url: '/data/apply/detail/' + id,
    method: 'get'
  })
}

// 生成SQL接口
export function generateSql(data) {
  return request({
    url: '/data/apply/generate/sql',
    method: 'post',
    data: data
  })
}

// 预执行SQL接口
export function preExecuteSql(data) {
  return request({
    url: '/data/apply/pre/execute/sql',
    method: 'post',
    data: data
  })
}